import * as API from './index'

//收货地址列表

export const addressList=(params)=>{
    return API.GET('/api/v1/addresses',params)
} 

//获取单条收货地址

export const addressOne=(params)=>{
    return API.GET('/api/v1/addresses/'+params)
}


//收货地址新增

export const addAddress=(params)=>{
    return API.POST('/api/v1/addresses',params)
}


//收货地址修改

export const updateAddress=(params)=>{
    return API.PUT('/api/v1/addresses/'+params.id,params)
}


//收货地址删除

export const addressDelete=(params)=>{
    return API.DELETE("/api/v1/addresses/"+params)
}